package com.xuexisheqv.subject.common.enums;

import lombok.Getter;

/**
 * 分类类型枚举
 */
@Getter
public enum CategoryTypeEnum {
    PRIMARY(1,"大类"),
    SECOND(0,"二级分类");

    private int code;
    private String desc;

    CategoryTypeEnum(int code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static CategoryTypeEnum getByCode(int codeVal){
        for (CategoryTypeEnum IsDeletedFlagEnum : CategoryTypeEnum.values()){
            if(IsDeletedFlagEnum.code == codeVal){
                return  IsDeletedFlagEnum;
            }
        }
        return null;
    }

}
